package jdwl.hrmgrsys.pojo;

import java.sql.Time;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.stereotype.Service;


/**
 * 雇员
 * @author Huangdian
 *
 */

@Entity
@Table(name="staff")
@Service("staff")
public class Staff {
	
	@Id
	@GeneratedValue
	@Column(name="id")
	private Integer id;
	/**
	 *头像地址
	 */
	@Column(name="img_src",nullable=true, length=80)
	private String imgSrc;
	/**
	 * 姓名
	 */
	@Column(name="name",nullable=false, length=40)
	private String name;
	/**
	 * 别名
	 */
	@Column(name="other_name1",nullable=true, length=40)
	private String otherName1;
	
	/**
	 * 身份证号
	 */
	@Column(name="identity_no",nullable=false, length=20)
	private String identityNo;
	
	/**
	 * 出生日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name="birthday",nullable=false, length=10)
	private Date birthday;
	
	/**
	 * 性别
	 */
	@Column(name="sex",nullable=false, length=1)
	private String sex;
	
	
	/**
	 * 名族
	 */
	@Column(name="folk_code",nullable=false, length=1)
	private String folkCode;
	
	/**
	 * 婚姻状况
	 */
	@Column(name="marriage",nullable=false, length=1)
	private String marriage;
	
	
	/**
	 * 文化程度
	 */
	@Column(name="educate_grade_code",nullable=false, length=1)
	private String educateGradeCode;
	
	/**
	 *政治面貌
	 */
	@Column(name="olitical_affiliation_code",nullable=false, length=1)
	private String politicalAffiliationCode;
	
	
	/**
	 *宗教信仰
	 */
	@Column(name="religion_code",nullable=false, length=1)
	private String religionCode;
	
	
	/**
	 *户口所在地
	 */
	@Column(name="household_code",nullable=false, length=8)
	private String householdCode;
	
	/**
	 *户口所在地详址
	 */
	@Column(name="household_address",nullable=false, length=100)
	private String householdAddress;
	
	
	/**
	 *现居住地
	 */
	@Column(name="local_native_code",nullable=false, length=8)
	private String localNativeCode;
	
	/**
	 *现居住地详址
	 */
	@Column(name="local_native_address",nullable=false, length=100)
	private String localNativeAddress;
	
	/**
	 *联系电话
	 */
	@Column(name="phone",nullable=false, length=11)
	private String phone;
	
	/**
	 *老家电话
	 */
	@Column(name="old_home_phone",nullable=false, length=16)
	private String oldHomePhone;

	/**
	 *创建日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name="create_date",nullable=false, length=10)
	private Date createDate;
	
	/**
	 *创建时间
	 */
	@Temporal(TemporalType.TIME)
	@Column(name="create_time",nullable=false, length=8)
	private Date createTime;
	
	/**
	 *更新日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name="update_date",nullable=false, length=10)
	private Date updateDate;
	
	/**
	 *更新时间
	 */
	@Temporal(TemporalType.TIME)
	@Column(name="update_time",nullable=false, length=8)
	private Date updateTime;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getOther_name1() {
		return otherName1;
	}

	public void setOther_name1(String otherName1) {
		otherName1 = otherName1;
	}

	public String getIdentityNo() {
		return identityNo;
	}

	public void setIdentityNo(String identityNo) {
		this.identityNo = identityNo;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getFolkCode() {
		return folkCode;
	}

	public void setFolkCode(String folkCode) {
		this.folkCode = folkCode;
	}

	public String getMarriage() {
		return marriage;
	}

	public void setMarriage(String marriage) {
		this.marriage = marriage;
	}

	public String getEducateGradeCode() {
		return educateGradeCode;
	}

	public void setEducateGradeCode(String educateGradeCode) {
		this.educateGradeCode = educateGradeCode;
	}

	public String getPoliticalAffiliationCode() {
		return politicalAffiliationCode;
	}

	public void setPoliticalAffiliationCode(String politicalAffiliationCode) {
		this.politicalAffiliationCode = politicalAffiliationCode;
	}

	public String getReligionCode() {
		return religionCode;
	}

	public void setReligionCode(String religionCode) {
		this.religionCode = religionCode;
	}

	public String getHouseholdCode() {
		return householdCode;
	}

	public void setHouseholdCode(String householdCode) {
		this.householdCode = householdCode;
	}

	public String getHouseholdAddress() {
		return householdAddress;
	}

	public void setHouseholdAddress(String householdAddress) {
		this.householdAddress = householdAddress;
	}

	public String getLocalNativeCode() {
		return localNativeCode;
	}

	public void setLocalNativeCode(String localNativeCode) {
		this.localNativeCode = localNativeCode;
	}

	public String getLocalNativeAddress() {
		return localNativeAddress;
	}

	public void setLocalNativeAddress(String localNativeAddress) {
		this.localNativeAddress = localNativeAddress;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getOldHomePhone() {
		return oldHomePhone;
	}

	public void setOldHomePhone(String oldHomePhone) {
		this.oldHomePhone = oldHomePhone;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Enterprise getEnterprise() {
		return enterprise;
	}

	public void setEnterprise(Enterprise enterprise) {
		this.enterprise = enterprise;
	}

	/**
	 * 头像地址
	 * @return
	 */
	public String getImgSrc() {
		return imgSrc;
	}

	public void setImgSrc(String imgSrc) {
		this.imgSrc = imgSrc;
	}

	@ManyToOne(cascade=CascadeType.PERSIST,targetEntity=Enterprise.class,fetch=FetchType.LAZY)
	private Enterprise enterprise;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	


	
	
}
